package pe.com.bbva.modpre.persistencia.hibernate;

import java.util.List;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import pe.com.bbva.modpre.dominio.Rating;
import pe.com.bbva.modpre.persistencia.RatingDAO;

@Repository
@SuppressWarnings("serial")
public class RatingHibernate extends BaseHibernate<Rating, Long> 
implements RatingDAO {
	
	@Autowired
	public RatingHibernate(SessionFactory sessionFactory){
		setSessionFactory(sessionFactory);
	}

	@Override
	public List<Rating> obtenerxSolicitud(long id) {
		// TODO Auto-generated method stub
		return buscarHql("select r from Rating r where solicitud.id=?", id);
	}

}
